#include<stdio.h>
#include<stdlib.h>
int main()
{
   int x=1;
   int y=1;
   int i,j;
   int velocity1=1;
   int velocity2=1;
   int up=0;
   int bottom=10;
   int left=0;
   int right=30;
   while(1)
   {
      system("cls");	 
	  x=x+velocity1;
	  y=y+velocity2;
   for(i=0;i<=x;i++)
      printf("\n");
   for(j=0;j<=y;j++)
       printf(" ");
	   printf("0\n");
	   if(x==up||x==bottom)
		   velocity1=-1*velocity1;
	   if(y==left||y==right)
		   velocity2=-1*velocity2;
   }
   return 0;
   }